package com.vshining.cryptoki.jna.pkcs11t;

/**
 * * @author Shining Wang <shiningwang@vshining.com>
 */
@SuppressWarnings("unused")
public interface CRYPTOKI_TYPE {

    public static final String PKCS11_CHARSET = "UTF-8";

    public static final int MAX_STACK_BUFFER_LEN = 4 * 1024;
    public static final int MAX_HEAP_BUFFER_LEN = 64 * 1024;

    public static final byte CK_TRUE = (byte) 0x01;
    public static final byte CK_FALSE = (byte) 0x00;

    public static final long CK_UNAVAILABLE_INFORMATION = -1L;
    public static final long CK_EFFECTIVELY_INFINITE = 0L;

    public static final long CK_INVALID_HANDLE = 0L;

    /* The following OTP-related defines are new for PKCS #11 v2.20 amendment 1
   and relates to the CKA_OTP_FORMAT attribute */
    public static final long CK_OTP_FORMAT_DECIMAL = 0L;
    public static final long CK_OTP_FORMAT_HEXADECIMAL = 1L;
    public static final long CK_OTP_FORMAT_ALPHANUMERIC = 2L;
    public static final long CK_OTP_FORMAT_BINARY = 3L;

    /* The following OTP-related defines are new for PKCS #11 v2.20 amendment 1
   and relates to the CKA_OTP_..._REQUIREMENT attributes */
    public static final long CK_OTP_PARAM_IGNORED = 0L;
    public static final long CK_OTP_PARAM_OPTIONAL = 1L;
    public static final long CK_OTP_PARAM_MANDATORY = 2L;

    /* The following OTP-related defines are new for PKCS #11 v2.20 amendment 1 */
    public static final long CK_OTP_VALUE = 0L;
    public static final long CK_OTP_PIN = 1L;
    public static final long CK_OTP_CHALLENGE = 2L;
    public static final long CK_OTP_TIME = 3L;
    public static final long CK_OTP_COUNTER = 4L;
    public static final long CK_OTP_FLAGS = 5L;
    public static final long CK_OTP_OUTPUT_LENGTH = 6L;
    public static final long CK_OTP_OUTPUT_FORMAT = 7L;

    /* The following OTP-related defines are new for PKCS #11 v2.20 amendment 1 */
    public static final long CKF_NEXT_OTP = 0x00000001L;
    public static final long CKF_EXCLUDE_TIME = 0x00000002L;
    public static final long CKF_EXCLUDE_COUNTER = 0x00000004L;
    public static final long CKF_EXCLUDE_CHALLENGE = 0x00000008L;
    public static final long CKF_EXCLUDE_PIN = 0x00000010L;
    public static final long CKF_USER_FRIENDLY_OTP = 0x00000020L;

}
